<template>
  <div class="header">
    <div class="header-icon">
      <van-icon name="scan" color="#fff" size="30" />
    </div>

    <div class="header-search">
      <van-search
        v-model="searchStr"
        placeholder="请输入搜索关键词"
        shape="round"
        background="none"
      />
    </div>

    <div class="header-icon">
      <van-icon name="chat-o" badge="99+" color="#fff" size="30" />
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";

const searchStr = ref("");
</script>

<style lang="less" scoped>
.header {
  display: flex;
  width: 100%;
}

@size: 54px;

.header-icon {
  width: @size;
  height: @size;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search {
  flex: 1;
  width: 0;
}
</style>
